Application Form and Control Definitions

The following Object Properties are cast against definitions for Form properties, and Form Controls properties as standard

Form Property Definitions

Property

Usual Setting

Notes

Name

frm*

Forms are defined with the object prefix 'frm'.

AutoScaleMode

None

Turned Off

AutoSize

False

Turned Off - Controlled by HighStone

AutoValidate

EnablePreventFocusChange

Where Validation is Used on the Form - Can be Disabled if no Validation is applied (in which case Validation setting is immaterial of course)

BackColor

Control

Standard System Colour - Light

ControlBox

False

Almost always turned off - this disables the Maximise, Minimise and Close buttons, and also hides the icon associated to the application.

Font

Take Default

Default is Microsoft Sans Serif, 8.25pt, Style normal.

ForeColor

ControlText

Standard System Colour - Black

FormBorderStyle

Sizable / FixedSingle

Set Sizable if the Form includes a Data Grid or Multi-line Text Control that can expand when the Form is resized - otherwise set a Fixed Size Form Border. 

Icon

Undefined

If needed set to the HighStone Blue Windmill icon.

KeyPreview

False (Usually)

False is the default setting - but True may be required if the Form has to trap key presses - such as Function Keys. 

Location

0, 0

Not used

MaximizeBox

False

Usually not relevant if ControlBox is False.   Usually disabled in other instances as few forms benefit from being displayed at full screen size.

MaximumSize

0, 0

Usually not set - most expandable Forms benefit from no upper limit.

MinimizeBox

False

Usually not relevant if ControlBox is False.   Usually disabled as HighStone requires the User to Close Panels - not leave them open.

MinimumSize

0, 0

Not usually set - but could be limited if appropriate.

ShowIcon

False

Usually this is not displayed - but if it is shown (on the title form) then use the HighStone Blue Windmill icon.

ShowInTaskbar

False (Usually)

This is set to False when the form is opened in Modal Mode (the usual) - but is set to True when the form can be opened in parallel with other panels (e.g. the SQL Test Panel).

Size

?, ?

Set to the standard form size as required by the design.

StartPosition

Not Used

HighStone controls all form positioning on the screen.

Tag

As Required

The Form Tag may be used internally by HighStone to monitor status conditions.

Text

Form Caption

Set as the base or starting Caption for the form.  HighStone automatically adds the [frmName] Caption to the start of the text on Debug Build Systems. 

WindowState

Normal

This is the default and ensures the form is visible when loaded.

 

Form Control Property Definitions

Property

Usual Setting

Notes

Name

<Prefix><DataField>

Standard Prefixes are applied based on the Control Type:

  • lbl - Label Control used to hold a Caption

  • txt - Text Box Control

  • cmb - Combo Control

  • lst - List Box / Checked List Box Control

  • chk - Check Box Control

  • opt - Radio Button Option Control

  • lbt - Label Control used to hold a Data Value

  • tab - Tab Control

  • pag - Page on a Tab Control

  • pnl - Panel Control

  • cmd - Command Button

  • pic - Picture Box

  • ttip - Tooltip Control

  • tvw - Tree View (Branched) Control

  • grd - Grid Control (FlexGrid)

Controls holding data values are named with the corresponding Table Field Name appended to the above prefix.  Thus txtWODescription is the Text Box control, and lblWODescription is the caption control.   For non-editable data controls the naming convention would be lbtWorksOrderId and lblWorksOrderId for label displays for the data value and the caption.

For Controls not directly related to data values the naming convention requires a name that is clearly indicative of the purpose of the Control - e.g. lblCaption, cmdSave, cmdClose, picAccessLock.  Where possible a similar naming convention is applied across all application forms.

Where a data value is repeated more than once on a form (e.g. on different tab pages), a suffix '2', '3' is applied to the Control Name.

Note: The automatic Control Naming Convention applied by the development environment (typically Image0, Image1, Image2) is always over-written with more meaningful names.

Anchor

Top, Left, Right, Bottom

Where a Form does not hold any Control that is expanding (typically a Data Grid or Multi-Line Text Box) then all Controls are tagged as Top, Left.  This rule applies even if the Form Border Style is set to Sizeable

On re-sizeable Forms, then one expanding Control will be set as Anchored to all four sides: Top, Left, Right, Bottom.  Controls below the expanding areas will then be Anchored to the Bottom rather than the Top.  Command buttons and record recall controls on the right hand side of the panel may then be Anchored to the Right rather than the Left.

Some Label Controls that show Status Information may benefit from being allowed to expand horizontally when the opportunity is given - but this often allows un-desirable over expansion.  In such cases HighStone will control the horizontal Control Size directly.

Complex Forms that require dynamic interaction of sizing between two or more controls are controlled by direct coding within HighStone.

BackColor

Window or Control

Refer to topic on Panel and Control Colours.

BorderStyle

Fixed 3D (Data Entry Controls)

None (Labels)

FixedSingle (Data Value Labels, Panels)

These are set for Text Boxes, Combo Pull-downs, Labels and Panels.  Generally a Flat Style for Panels is preferred - Panels can be 'hidden' by setting a similar colour combination as the parent control, and not setting a BorderStyle.

CausesValidation

True

Most Forms use the Data Validation Call that is triggered on the Lost Focus action of a Control and hence this setting can be left at the default True value.  Forms that do not use this method of Validation (some pop-up prompt panels use Form Based Validation when the Save button is clicked) the coding will ignore the triggered call - so the setting here is not crucial.

CausesValidation on Command Buttons is not used by HighStone.

Note that the Validation call is triggered whenever the focus moves through the control - and not just after the control contents have been changed.  HighStone Coding must take account of this operational requirement.  Care is needed not to lock the User in to a field that has been inadvertently changed and no route to restoring a valid entry is provided.

Validation Control has been changed a number of times within the development environments over the years - as the environments try to respond to give a workable mechanism.  HighStone controls data validation itself. 

DataSource

None

HighStone controls all data loading from supporting tables and the return of changed values.  Controls are not bound to the supporting database.

DropDownStyle

DropDown

Set on Combo-Dropdown controls.

DropDownWidth

<As Required>

The default is the width of the control itself - which is usually adequate.

Enabled

True

The use of False for Enabled status is reserved to two specific uses:

  • Command Buttons - HighStone enables / Disables the buttons as required.

  • Data Entry Controls - Only set to False when a Control is no longer Valid for use on the Form (but usually the Visible Status will be set to False to hide the Control in such cases).  Enabled set to False is not used to lock a field from User Edit when a data value is valid - such edit control is managed by HighStone coding.  This is to avoid the un-desirable greying of the Control colour scheme.

Label Controls support an Enabled state - if this is set to False then mouse clicks on the control will be disabled.

FlatStyle

Standard

Applied to Command Buttons and Labels.  Panels do not support this property - use BorderStyle instead.

Font

Default unless a change appropriate

Default is Microsoft Sans Serif, 8.25pt, Style normal.  Intermediate Caption labels are shown to the same 8.25pt size, with Bold style (and Maroon).  Form Captions are given in Font Size 9.75pt, with Bold style (and Blue).

ForeColor

WindowText or ControlText

Refer to topic on Panel and Control Colours.

Location

<Top>, <Left>

Set as required.

Locked

False

Not used by HighStone.

MaxLength

32767 (Default)

Not used by HighStone.  Setting text length limitations on Controls at Design Time is avoided - due to potential changes in supporting database definitions.

MultiLine

False or True

Text Box Controls - enables multi-line edit options and used where appropriate. 

Only used where the supporting data field is a 'Note' style (text field of unlimited length); such data values must support the saving of line feed characters to maintain formatting.  General 'Title' text data values for Objects always shown in a single line Text Box; data values declared as fixed length text fields within the database table.

On a Tab Control the MultiLine property is used to determine if Tab Buttons for the Pages are to be shown as a single row, or multiple rows are shown. 

PasswordChar

Set to '*' as required

Where a Password field is required in a Text Control the character set is '*'.

Note that the PasswordChar facility is only valid when MultiLine is set to False.

ReadOnly

False

Not used by HighStone.

Of limited use as this property is applied to Text Boxes only - and not CheckBox and Combo Pull-down Controls.

ScrollBars

None or Vertical

For multi-line Text Box Controls only: set to Vertical where appropriate, or Both under certain circumstances.

Size

<Width>, <Height>

Set as required:

  • Text Box Controls have a default Height of 20 pixels.

  • Combo Pull-Down Controls have a default Height of 21 pixels.

  • CheckBox Controls have a default height of 20 pixels.

  • Labels associated to Controls should be set to the same Height as the Control they relate to.

  • Form prime Command Buttons set to typical Dimensions of 75, 24

  • Non-prime Command Buttons can be sized to a Height of 20 pixels - Font Size may be reduced to 6.75pt if additional text length for the caption is required.

  • Square Command Buttons (e.g. Tick Command Buttons) set to a size of 20, 20 or 24,24 if icon images are required [some additional width may be required to carry text captions].

TabIndex

Set as required

TabIndex defines the sequence of movement of the cursor between controls through use of the Tab key.  Controls must be set with a TabIndex that defines a general progression of Left to Right, and then Top to Bottom across the Form.  Variations from this progression can be defined in exceptional cases where the panel design requires it.

TabStop

Set as required

Data Entry Controls will have this set to True to ensure the Tab key moves focus to the target control.  Labels are always skipped automatically - Form prime Command Buttons should be included at the end of the tab sequence definition.

Some advanced or special Controls and Command Buttons may have the TabStop set to False; e.g. Command Buttons to Object Folders. 

Tag

Not Defined

HighStone may use the Tag property internally to control application operation.  There is no requirement to set this property at Design Time.

Text

Control Caption

Set as required to give the required Control Caption.

Text Box and Pull-down Combo Controls should be set to Null (though not essential as HighStone will cast all such fields on Form Load).

TextAlign

As Required

Most Controls will use a MiddleLeft setting - particularly on Labels associated to data controls in order to maintain vertical alignment of the caption.

Controls showing multi-line text must use a TopLeft setting.

Some Data Values may be shown with a MiddleCenter setting.

Text Box Controls support the horizontal aspect of this setting only: Left, Center, Right.

ToolTip

Not Defined

HighStone controls this Property where it is used.   HighStone does not routinely use ToolTips to offer static prompts on the usage of a field or control (that information is provided in the Help documentation).  Tooltips text is used to show dynamic values - such as comments and highlighted file contents, or to prompt functional use on lesser used areas of the application.

Visible

True or False

Visible Status is usually set to True as a starting position - but False may be set where it is appropriate to hide a Control on the initial Form Load.